import request from "@/utils/request";
import ConstTable from './ConstTable'

// 获取打印机配置
export function getPrinterConfigInfo(id)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/${id}`,
        method: "GET"
    });
}

// 获取所有打印机信息
export function GetPrinterAll()
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/All`,
        method: "GET"
    });

}

// 获取打印机配置列表
export function getPrinterConfigList(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig`,
        method: "GET",
        data
    });
}

// 新建打印机配置
export function createPrinterConfig(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig`,
        method: "POST",
        data
    });
}

// 更新打印机配置
export function updatePrinterConfig(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/${data.id}`,
        method: "PUT",
        data
    });
}

// 删除打印机配置
export function delPrinterConfig(id)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/${id}`,
        method: "DELETE"
    });
}

// 导出打印机配置
export function exportPrinterConfig(query) {
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/Actions/Export`,
        method: "GET",
        data: query
    });
}

// 批量删除打印机配置
export function delPrinterConfigBatch(data)
{
    return request({
        url: `${ConstTable.BaseUrl}/BaseData/PrinterConfig/BatchRemove`,
        method: 'POST',
        data
    })
}